//
//  WPTabBarMainController.swift
//  gz19weiboUP
//
//  Created by wp on 15/9/29.
//  Copyright © 2015年 wp. All rights reserved.
//

import UIKit

class WPTabBarMainController: UITabBarController {
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        subSetChildController()
    }
    func subSetChildController(){
        
        let firstMessageC = WPfirstTableViewController()
        let finderVC = WPFinderViewController()
        let messageVC = WPMessageTableViewController()
        let meVC = WPMeTableViewController()
        
//        firstMessageC.tabBarItem.title = "首页"
//        finderVC.tabBarItem.title = "发现"
//        messageVC.tabBarItem.title = "消息"
//        meVC.tabBarItem.title = "我"
      
        firstMessageC.tabBarItem = UITabBarItem(title: "首页", image: UIImage(named: "tabbar_home"), selectedImage: UIImage(named: "tabbar_home_highlighted"))
        finderVC.tabBarItem = UITabBarItem(title: "发现", image: UIImage(named: "tabbar_discover"), selectedImage: UIImage(named: "tabbar_discover_highlighted"))
        messageVC.tabBarItem = UITabBarItem(title: "消息", image: UIImage(named: "tabbar_message_center"), selectedImage: UIImage(named: "tabbar_message_center_highlighted"))
        meVC.tabBarItem = UITabBarItem(title: "我", image: UIImage(named: "tabbar_profile"), selectedImage: UIImage(named: "tabbar_profile_highlighted"))
        
        addChildViewController(firstMessageC)
        addChildViewController(finderVC)
        addChildViewController(UIViewController())
        addChildViewController(messageVC)
        addChildViewController(meVC)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
